<template>
	<view class="position-relative">
		<view v-if="title" class="adv-title mt-2 mb-1 mx-2">{{title}}</view>
		<image :src="cover" mode="" v-if="cover" :class="del?'adv-img':'adv-img2'" @click="handelImage"></image>
		<slot></slot>
	</view>
</template>

<script setup>
	defineProps({
		title:{
			type:String
		},
		cover:{
			type:String
		},
		del:{
			type:Boolean,
			default:true
		}
	})
	const emit = defineEmits(['delContent'])
	const handelImage = ()=>{
		 console.log('222222222222222222');
		 console.log(emit);
		 emit('delContent')
	}
</script>

<style>
	.adv-title {
		font-size: 32rpx;
	}

	.adv-img {
		width: 750rpx;
		height: 400rpx;
	}
	.adv-img2 {
		width: 30rpx;
		height: 38rpx;
		position: absolute;
		top:10rpx;
		right:20rpx;
	}
</style>